



import request from './request.js';

export default{
    del(query){
        return request({
            url: BASE+'/friend/delete',
            method: 'get',
            params:query
        })
    },
    getInfo(query){
        return request({
            url: BASE+'/friend/info',
            method: 'get',
            params:query
        })
    },

    getLouDong(query){
        return request({
            url: BASE+`/community/queryAllBuilding/${query.id}`,
            method: 'get'
        })
    },
    getHouseBy(query){
        return request({
            url: BASE+`/community/queryAllHouse/${query.id}`,
            method: 'get'
        })
    },
    getlist(query){
        return request({
            url: BASE+'/friend/list',
            method: 'get',
            params:query
        })
    },
    getVillage2(query){
        return request({
            url: BASE+`/community/queryAllCommunity`,
            method: 'get',
            params:{
                openId:openid
            }
        })
    },
    getVillage(query){
        return request({
            url: BASE+'/community/queryAllCommunity',
            method: 'get'
        })
    },
    add(query){
        return request({
            url: BASE+'/friend/save',
            method: 'post',
            data:query
        })
    },
    addHouse(query){
        return request({
            url: BASE+'/friend/house',
            method: 'post',
            data:query
        })
    },
    ///friend/house/{friendId}
    friendhouselist(query){
        return request({
            url: BASE+`/friend/house/${query}`,
            method: 'get',
            data:query
        })
    },
    ///publicUser/info
    publicUser(query){
        return request({
            url: BASE+`/publicUser/info/${openid}`,
            method: 'get',
            data:query
        })
    },
    delhouse(query){
        return request({
            url: BASE+`/friend/house`,
            method: 'delete',
            data:query
        })
    }
}